package com.quicks.beauty.core.vo;

import java.math.BigDecimal;
import java.text.DecimalFormat;

public class ProductSub {

    private DecimalFormat df = new DecimalFormat("#");


    private String productId;

    private String subId;

    private String subname;

    private String pics;

    private String points;

    private BigDecimal price;
    private int subPoints;
    private int kinds;

    public int getSubPoints() {
        return subPoints;
    }

    public void setSubPoints(int subPoints) {
        this.subPoints = subPoints;

    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }


    public String getSubId() {
        return subId;
    }

    public void setSubId(String subId) {
        this.subId = subId;
    }



    public String getSubname() {
        return subname;
    }

    public ProductSub setSubname(String subname) {
        this.subname = subname;
        return this;
    }

    public String getPics() {
        return pics;
    }

    public void setPics(String pics) {
        this.pics = pics;
    }

    public String getPoints() {
        if(price!=null && price.compareTo(BigDecimal.ZERO)>0){
            String format = df.format(price.multiply(BigDecimal.TEN));
            return format;
        }
        return points;
    }

    public void setPoints(String points) {
        this.points = points;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getKinds() {
        return 2;
    }

    public void setKinds(int kinds) {
        this.kinds = kinds;
    }
}
